package com.bc.service.deal.QJLfutures;

import java.io.IOException;

import android.content.Context;

import com.bc.service.GenericService;
import com.bc.service.SimpleRequestListener;
import com.bc.service.deal.BtcCategory;
import com.bc.service.deal.ServiceCategory;
import com.bc.service.deal.QJLfutures.QJLfuturesResponse.Ticker;

/**
 * 796期货
 * @author ywen
 *
 */
public class QJLfuturesService extends GenericService<QJLfuturesRequest, QJLfuturesResponse> implements ServiceCategory{

	public QJLfuturesService(Context context) {
		super(context);
	}
	
	public Ticker getQJLfuturesTickers() {
		return mResponse == null ? null : mResponse.ticker;
	}
	
	@Override
	protected void onRequest(int requestCode, QJLfuturesRequest request) {
		
	}

	@Override
	protected void onResponse(int requestCode, QJLfuturesRequest request,
			QJLfuturesResponse response) throws IOException {
		
	}

	@Override
	public void loadBtcData(SimpleRequestListener listener) {
		setRequest(new QJLfuturesRequest());
		request(REQUEST_CODE_LOAD, listener);
	}

	@Override
	public BtcCategory getServieResponse() {
		return mResponse;
	}

	@Override
	public void cancelLoading() {
		super.cancel();
	}

}
